1. Create pshader.fx, open it in notepad
2. paste the following code:

sampler2D screen;

float4 MyShader( float2 Tex : TEXCOORD0 ) : COLOR0
{
    float4 Color;
    float4 tmp;
    
    Color = tex2D( screen, Tex.xy);
    tmp = Color;
    
    tmp.r = Color.r;
    Color.r = Color.b;
    Color.b = tmp.r;

    return Color;
}


technique PostProcess
{
    pass p1
    {
        VertexShader = null;
        PixelShader = compile ps_1_0 MyShader();
    }

}

3. save and close the file, open it again with VS2008
4. File -> Advanced Save Options -> Encoding: Western European (Windows) - Codepage 1252 -> Line endings: Windows (CR LF)
5. Save again
6. DX9SDK -> search for fxc.exe, copy it into the directory where you've saved your pshader.fx
7. Open a cmd window, navigate to this directory
8. Enter the following line: fxc /T:ps_1_1 /E:MyShader /Zi /Fc:pshader.fxc pshader.fx
9. Hit enter, close the window, open up pshader.fxc with notepad
10. Create a new file -> pshader.psh, open it with notepad
11. In pshader.psh enter the following line:

ps.1.1

12. From pshader.fxc copy the following line and paste it in pshader.psh, just under ps.1.1:

def c0, 1, 0, 0, 0
def c1, 0, 0, 1, 0

tex t0
dp3 r0, c0, t0
lrp r0, c1, r0, t0
dp3 r1, c1, t0
lrp r0, c0, r1, r0

13. Close pshader.fxc, save pshader.psh
14. From the XDK, copy xsasm.exe to your shader directory
15. Drag pshader.psh into xsasm.exe -> you get a new file: pshader.xpu
16. Copy pshader.xpu into dist/Media
17. You're done :)

P.S. Good shader tutorials: http://www.facewound.com/tutorials/shader1
http://mgeshaderlibrary.wikispaces.com/Shader+Basics
